package com.tourism.admin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tourism.admin.common.Result;
import com.tourism.admin.model.dto.UserAddressDto;
import com.tourism.admin.model.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserService extends IService<User> {
    // 一对多查询
    Page<User> findPage(Page<User> page, @Param("nickName") String nickName);

    List<UserAddressDto> countAddress();

    // 查询用户名
    User selectByName(String username);

    int updatePass(Map<String, Object> map);

    Result<?> login(User user);

    Result<?> register(User user);

    Result<?> saves(User user);

    Result<?> pass(Map<String, Object> map);

    Result<?> changeRole(User user);
}
